/**
 * Created by yuris on 29.01.15.
 */
package InterfaceObjects.OrdetProductWindow {
import InterfaceObjects.AbstractTabWindow;

import flash.geom.Point;

import starling.display.Sprite;

public class OrderProductWindow extends AbstractTabWindow {
    public function OrderProductWindow(title:String, tabNames:Array) {
        super(title, tabNames);
    }

    private var _bufContentItem:Sprite
    override protected function _contentItemFactory(itemData:Object):Sprite {
        this._bufContentItem = new OrderProductItem(itemData.id, itemData.icon, itemData.description);
        //this._bufContentItem.alignPivot("left","top");
        return this._bufContentItem;
    }

    private var _bufPoint:Point =  new Point();
    override protected function _itemPositionFactory(itemNum:int):Point {
        this._bufPoint.setTo(2 +(itemNum % 2)* 260 - 80*0,int(itemNum*0.5) * 100)
        return this._bufPoint;
    }

}
}
